@extends('home/main/layout')
@section('title','商品')
@section('introduce')
<style>
	.result
	{
		width:100px;
		height:50px;
		border:1px solid blue;
		position:relative;
		float:left;
		margin-left:10px;
		display:block;
		font:bold 20px/50px 黑体;
		text-align:center;
		color:blue;
	}
	.result div
	{
		width:20px;
		height:20px;
		position:absolute;
		left:78px;
		top:0px;
		background:red;
		font:10px 宋体;
	}
</style>
@stop
@section('content')
<!--bottom-header-->
<!--start-breadcrumbs-->
<div class="breadcrumbs">
	<div class="container">
		<div class="breadcrumbs-main">
			<ol class="breadcrumb">
				<li><a href="{{asset('/')}}">首页</a></li>
				<li class="active">商品</li>
			</ol>
		</div>
	</div>
</div>
<!--end-breadcrumbs-->
<!--start-product--> 
<div class="product">
	<div class="container">
		<div class="product-main">
			<div class="col-md-9 p-left">
			<div>
				<h2 width="60">搜索结果：</h2>
				<!--
				<div class="result">男子
					<div>X</div>
				</div>
				<div class="result">休闲</div>
				<div style="clear:both;">&nbsp;</div>
				-->
			</div>
		
				@for($key=0;$key < count($data);$key++)
				@if($key%3 == 0)
					<div class="product-one">
				@endif
					<div class="col-md-4 product-left single-left"> 
						<div class="p-one simpleCart_shelfItem">
							<a href="/chicknum/{{$data[$key]->product_id}}">
								<img src="/uploads/product/logo_pic/{{$data[$key] -> logo_pic}}" alt="" />
								<div class="mask mask1">
									<span>快去看看</span>
								</div>
							</a>

							<h4>{{$data[$key] -> title}}</h4>
							<p><a href="/chicknum/{{$data[$key]->product_id}}"><span class="item_price">￥{{$data[$key] -> sprice}}</span></a></p>

							
						</div>
					</div>
				@if($key%3 ==0)
					</div>
				@endif
					@if($key%3 ==2)
					<div class="clearfix"> </div>
					@endif
				@endfor
			
			</div>

		<div class="col-md-3 p-right single-right">
		@if($search)
			<h3>人群</h3>
				<ul class="product-categories">
					@foreach($cdata as $key=>$val)
						<li><a href="/product/?&cro_id={{$val->crowd_id}}">{{$val->crowd_type}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
			<h3>运动</h3>
				<ul class="product-categories">
					@foreach($sdata as $key=>$val)
						<li><a href="/product/?spo_id={{$val->sport_id}}">{{$val->sport_type}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
			<h3>品牌</h3>
				<ul class="product-categories">
					@foreach($bdata as $key=>$val)
						<li><a href="/product/?brand_id={{$val->brand_id}}">{{$val->brand_name_zh}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
		@elseif($arr == 1)
			
			<h3>品牌</h3>
				<ul class="product-categories">
					@foreach($bdata as $key=>$val)
						<li><a href="/product/?cro_id={{$cro_id}}&spo_id={{$spo_id}}&brand_id={{$val->brand_id}}">{{$val->brand_name_zh}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
		@elseif($arr == 2)
			
			<h3>运动</h3>
				<ul class="product-categories">
					@foreach($sdata as $key=>$val)
						<li><a href="/product/?cro_id={{$cro_id}}&brand_id={{$brand_id}}&spo_id={{$val->sport_id}}">{{$val->sport_type}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
		@elseif($arr == 3)
			
		@else
			<h3>运动</h3>
				<ul class="product-categories">
					@foreach($sdata as $key=>$val)
						<li><a href="/product/?cro_id={{$cro_id}}&spo_id={{$val->sport_id}}">{{$val->sport_type}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
			<h3>品牌</h3>
				<ul class="product-categories">
					@foreach($bdata as $key=>$val)
						<li><a href="/product/?cro_id={{$cro_id}}&brand_id={{$val->brand_id}}">{{$val->brand_name_zh}}</a> <span class="count">(14)</span></li>
					@endforeach
				</ul>
		@endif

		</div>
		<div class="clearfix"> </div>
	</div>
{!! $data -> appends($request) -> render() !!}
</div>
	
@stop

